<template>
	<view class="passenger-flow">
		<view class=""
			style="width: 100%;height: 180rpx;background-color: #fff;position: relative;top: 0;z-index: 999;">
			<view class="con-1">
				<view class="bg">
					<view class="address">
						<view class="flex-space-between">
							<view class="flex-align">
								<van-image v-if="itemChooselist.venue_thumb != ''" width="74rpx" height="74rpx"
									radius="2" style="margin-right: 10rpx;" :src="itemChooselist.venue_thumb" />
								<van-image v-else width="74rpx" height="74rpx" radius="10rpx" fit="cover" style="margin-right: 10rpx;" src="https://img.yzcdn.cn/vant/cat.jpeg" />
								<view>
									<view class="address-name">{{itemChooselist.venue_name}}</view>
									<view class="address-desc">地址:{{itemChooselist.address}}</view>
								</view>
							</view>
							<view class="exchange flex-center flex-column " @click="show_no">
								<van-icon name="exchange" size="16" />
								切换
							</view>
						</view>
					</view>
				</view>
				<view class="" style="margin-top: 210rpx;">
					<text lines="1" class="text_8">礼品</text>
					<view class="box_6">
						<view class="section_6" @click="lipng(1)">
							<view class="text-wrapper_13">
								<text lines="1" class="text_9">礼品</text>
								<text lines="1" class="text_34">剩余:8</text>
							</view>
							<image
								src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/ca5f035b9d6f5c0a2e5485960f881ed7d6dae3f2.png"
								class="image_8"></image>
						</view>
						<view class="section_7" @click="lipng(2)">
							<view class="text-wrapper_14">
								<text lines="1" class="text_10">纸质券</text>
								<text lines="1" class="text_35">剩余:8</text>
							</view>
							<image
								src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/430874e067fe1d363cc7a0ea98a28292f517a05f.png"
								class="image_9"></image>
						</view>
					</view>
					<view class="block_6" @click="lipng(3)">
						<view class="text-wrapper_15">
							<text lines="1" class="text_11">线下活动</text>
							<text lines="1" class="text_36">剩余:8</text>
						</view>
						<image
							src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/8793f8a0112744b7b87fcb4fc791896830e94085.png"
							class="image_10"></image>
					</view>
					<text lines="1" class="text_4">优惠券</text>
					<view class="box_7">
						<view class="section_4" @click="lipng(4)">
							<view class="text-wrapper_16">
								<text lines="1" class="text_5">代金券</text>
								<text lines="1" class="text_31">剩余:8</text>
							</view>
							<image
								src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/e751369cc74d09eac7fe50d15c62419fe41561ff.png"
								class="image_5"></image>
						</view>
						<view class="section_5" @click="lipng(5)">
							<view class="text-wrapper_17">
								<text lines="1" class="text_6">满减券</text>
								<text lines="1" class="text_32">剩余:8</text>
							</view>
							<image
								src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/2b070e9ab344ebf11d4c08237b2d6940f765e55a.png"
								class="image_6"></image>
						</view>
					</view>
					<view class="block_4" @click="lipng(6)">
						<view class="text-wrapper_18">
							<text lines="1" class="text_7">折扣券</text>
							<text lines="1" class="text_33">剩余:8</text>
						</view>
						<image
							src="https://jiangsudiantuo2022.oss-cn-hangzhou.aliyuncs.com/img/a6d1383100c0c041d336a07da857deb58ef70277.png"
							class="image_7"></image>
					</view>
				</view>
			</view>
		</view>
		<!-- 场馆切换 -->
		<van-popup closeable :show="show" round position="bottom" get-container="body" @close="showclose"
			:z-index='9999'>
			<view class="good-box">
				<view class="title">
					切换场馆
				</view>
				<view class="good-list">
					<view class="good-item" v-for="(item,index) in venuelist" :key="index" @click="onChangelist(item)">
						<view class="flex-align">
							<van-image width="124rpx" height="124rpx" radius="10rpx" fit="cover"
								v-if="item.venue_thumb != ''" :src="item.venue_thumb" />
							<van-image v-else width="124rpx" height="124rpx" radius="10rpx" fit="cover"
								src="https://img.yzcdn.cn/vant/cat.jpeg" />
							<view class="info">
								<view class="name">{{item.venue_name}}</view>
								<view class="flex-align" v-if="item.project_list != ''">
									<view class="tag" v-if="item.project_list[0].name != ''">
										{{item.project_list[0].name}}
									</view>
									<view class="tag" v-if="item.project_list[1].name != '' && item.project_list[1]">
										{{item.project_list[1].name}}
									</view>
									<view class="tag" v-if="item.project_list[2].name != ''&& item.project_list[2]">
										{{item.project_list[2].name}}
									</view>
								</view>
								<view class="address">{{item.address}}</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</van-popup>
	</view>
</template>

<script>
	const member = require("@/api/member/index.js");
	export default {
		data() {
			return {
				lineChartData: {},
				show: false,
				venuelist: [], //场馆列表
				itemChoose: {}, // 场馆数据
				itemChooselist: {}, // 场馆数据
				venue_id:''

			}
		},
		onLoad(options) {
			// 场馆数组
			if (uni.getStorageSync("entry_name") == '') {
				uni.showToast({
					title: '请登录！',
					icon: 'exception',
					duration: 850
				});
				setTimeout(() => {
					uni.navigateTo({
						url: '/pages/my-center/my-center'
					})
				}, 1000);
			}
			var data = uni.getStorageSync("wqzdy");
			var items = JSON.parse(data)
			this.venuelist = items
			this.itemChooselist = this.venuelist[0]
			this.venue_id = this.venuelist[0].id
			// this.marketindex()
		},
		methods: {
			async marketindex() {
				let that = this;
				let data = {
					venue_id:'',
					id:'',
					output:'',
				};
				let result = await member.marketindex(data);
				if (result.code == 1) {
					this.newsList = result.data.data
				}
			},
			lipng(type){
				if (type == 1 || type == 2) {
					uni.navigateTo({
						url:'./points_zone?venue_id=' + this.venue_id
					})
				} else{
					uni.showToast({
						title: '敬请期待',
						duration: 2000,
						icon: 'none'
					});
				}
			},
			// 选中场馆
			onChangelist(item) {
				this.venue_id = item.id
				this.itemChoose = item
				this.lineChartData = []
				this.itemChooselist = this.itemChoose
				this.show = false
			},
			// 点击切换
			show_no() {
				this.show = true
			},
			// 关闭选择场馆弹窗
			showclose() {
				this.show = false
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import '../../static/css/member/member_index.scss';

	.text_8 {
		width: 53rpx;
		height: 26rpx;
		overflow-wrap: break-word;
		color: rgba(51, 51, 51, 1);
		font-size: 28rpx;
		font-family: PingFang-SC-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 28rpx;
		margin: 40rpx 0 0 10rpx;
	}

	.box_6 {
		width: 690rpx;
		height: 160rpx;
		flex-direction: row;
		display: flex;
		justify-content: space-between;
		margin: 40rpx 0 0 10rpx;
	}

	.section_6 {
		background-color: rgba(248, 247, 252, 1.0);
		border-radius: 20rpx;
		width: 330rpx;
		height: 160rpx;
		flex-direction: row;
		display: flex;
	}

	.text-wrapper_13 {
		width: 67rpx;
		height: 66rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		margin: 47rpx 0 0 33rpx;
	}

	.text_9 {
		width: 52rpx;
		height: 24rpx;
		overflow-wrap: break-word;
		color: rgba(51, 51, 51, 1);
		font-size: 28rpx;
		font-family: FZKATJW--GB1-0;
		font-weight: normal;
		text-align: left;
		white-space: nowrap;
		line-height: 46rpx;
	}

	.text_34 {
		width: 67rpx;
		height: 23rpx;
		overflow-wrap: break-word;
		color: rgba(153, 153, 153, 1);
		font-size: 24rpx;
		font-family: PingFang-SC-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 34rpx;
		margin-top: 19rpx;
	}

	.image_8 {
		width: 146rpx;
		height: 88rpx;
		margin: 36rpx 8rpx 0 76rpx;
	}

	.section_7 {
		background-color: rgba(248, 247, 252, 1.0);
		border-radius: 20rpx;
		width: 330rpx;
		height: 160rpx;
		flex-direction: row;
		display: flex;
	}

	.text-wrapper_14 {
		width: 81rpx;
		height: 65rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		margin: 48rpx 0 0 37rpx;
	}

	.text_10 {
		width: 81rpx;
		height: 25rpx;
		overflow-wrap: break-word;
		color: rgba(51, 51, 51, 1);
		font-size: 28rpx;
		font-family: FZKATJW--GB1-0;
		font-weight: normal;
		text-align: left;
		white-space: nowrap;
		line-height: 46rpx;
	}

	.text_35 {
		width: 67rpx;
		height: 23rpx;
		overflow-wrap: break-word;
		color: rgba(153, 153, 153, 1);
		font-size: 24rpx;
		font-family: PingFang-SC-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 34rpx;
		margin: 17rpx 0 0 2rpx;
	}

	.image_9 {
		width: 77rpx;
		height: 98rpx;
		margin: 30rpx 25rpx 0 110rpx;
	}

	.block_6 {
		background-color: rgba(248, 247, 252, 1.0);
		border-radius: 20rpx;
		width: 330rpx;
		height: 160rpx;
		flex-direction: row;
		display: flex;
		margin: 30rpx 0 40rpx 10rpx;
	}

	.text-wrapper_15 {
		width: 109rpx;
		height: 67rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		margin: 46rpx 0 0 33rpx;
	}

	.text_11 {
		width: 109rpx;
		height: 25rpx;
		overflow-wrap: break-word;
		color: rgba(51, 51, 51, 1);
		font-size: 28rpx;
		font-family: FZKATJW--GB1-0;
		font-weight: normal;
		text-align: left;
		white-space: nowrap;
		line-height: 46rpx;
	}

	.text_36 {
		width: 67rpx;
		height: 23rpx;
		overflow-wrap: break-word;
		color: rgba(153, 153, 153, 1);
		font-size: 24rpx;
		font-family: PingFang-SC-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 34rpx;
		margin-top: 19rpx;
	}

	.image_10 {
		width: 100rpx;
		height: 78rpx;
		margin: 42rpx 28rpx 0 60rpx;
	}

	.text_4 {
		width: 83rpx;
		height: 27rpx;
		overflow-wrap: break-word;
		color: rgba(51, 51, 51, 1);
		font-size: 28rpx;
		font-family: PingFang-SC-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 28rpx;
		margin: 0 0 0 10rpx;
	}

	.box_7 {
		width: 690rpx;
		height: 160rpx;
		flex-direction: row;
		display: flex;
		justify-content: space-between;
		margin: 40rpx 0 0 10rpx;
	}

	.section_4 {
		background-color: rgba(248, 247, 252, 1.0);
		border-radius: 20rpx;
		width: 330rpx;
		height: 160rpx;
		flex-direction: row;
		display: flex;
	}

	.text-wrapper_16 {
		width: 81rpx;
		height: 67rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		margin: 47rpx 0 0 32rpx;
	}

	.text_5 {
		width: 81rpx;
		height: 25rpx;
		overflow-wrap: break-word;
		color: rgba(51, 51, 51, 1);
		font-size: 28rpx;
		font-family: FZKATJW--GB1-0;
		font-weight: normal;
		text-align: left;
		white-space: nowrap;
		line-height: 46rpx;
	}

	.text_31 {
		width: 67rpx;
		height: 23rpx;
		overflow-wrap: break-word;
		color: rgba(153, 153, 153, 1);
		font-size: 24rpx;
		font-family: PingFang-SC-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 34rpx;
		margin: 19rpx 0 0 1rpx;
	}

	.image_5 {
		width: 91rpx;
		height: 87rpx;
		margin: 37rpx 34rpx 0 92rpx;
	}

	.section_5 {
		background-color: rgba(248, 247, 252, 1.0);
		border-radius: 20rpx;
		width: 330rpx;
		height: 160rpx;
		flex-direction: row;
		display: flex;
	}

	.text-wrapper_17 {
		width: 82rpx;
		height: 67rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		margin: 47rpx 0 0 31rpx;
	}

	.text_6 {
		width: 82rpx;
		height: 25rpx;
		overflow-wrap: break-word;
		color: rgba(51, 51, 51, 1);
		font-size: 28rpx;
		font-family: FZKATJW--GB1-0;
		font-weight: normal;
		text-align: left;
		white-space: nowrap;
		line-height: 46rpx;
	}

	.text_32 {
		width: 67rpx;
		height: 23rpx;
		overflow-wrap: break-word;
		color: rgba(153, 153, 153, 1);
		font-size: 24rpx;
		font-family: PingFang-SC-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 34rpx;
		margin: 19rpx 0 0 4rpx;
	}

	.image_6 {
		width: 114rpx;
		height: 87rpx;
		margin: 37rpx 14rpx 0 89rpx;
	}

	.block_4 {
		background-color: rgba(248, 247, 252, 1.0);
		border-radius: 20rpx;
		width: 330rpx;
		height: 160rpx;
		flex-direction: row;
		display: flex;
		margin: 30rpx 0 0 10rpx;
	}

	.text-wrapper_18 {
		width: 81rpx;
		height: 66rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		margin: 48rpx 0 0 32rpx;
	}

	.text_7 {
		width: 81rpx;
		height: 24rpx;
		overflow-wrap: break-word;
		color: rgba(51, 51, 51, 1);
		font-size: 28rpx;
		font-family: FZKATJW--GB1-0;
		font-weight: normal;
		text-align: left;
		white-space: nowrap;
		line-height: 46rpx;
	}

	.text_33 {
		width: 67rpx;
		height: 23rpx;
		overflow-wrap: break-word;
		color: rgba(153, 153, 153, 1);
		font-size: 24rpx;
		font-family: PingFang-SC-Medium;
		font-weight: 500;
		text-align: left;
		white-space: nowrap;
		line-height: 34rpx;
		margin: 19rpx 0 0 1rpx;
	}

	.image_7 {
		width: 99rpx;
		height: 88rpx;
		margin: 36rpx 30rpx 0 88rpx;
	}
</style>